str_test = "a,b,c,d"

str_split_list = str_test.split(",", maxsplit=-1)

print(type(str_split_list), "str_split_list=", str_split_list)

nums = ["1", "2", "3", "4", "5"]

nums_str = "@".join(nums)

print("nums_str===", nums_str)


# 列表
list_fruits = ["apple", "banana", "orange"]
list_joined = ", ".join(list_fruits)
print("列表连接:", list_joined)

# 元组
tuple_fruits = ("apple", "banana", "orange")
tuple_joined = ", ".join(tuple_fruits)
print("元组连接:", tuple_joined)

# 集合（注意：集合是无序的）
set_fruits = {"apple", "banana", "orange"}
set_joined = ", ".join(set_fruits)
print("集合连接:", set_joined)

# 字符串（字符串也是可迭代对象）
string_chars = "hello"
string_joined = "-".join(string_chars)
print("字符串字符连接:", string_joined)

# 生成器表达式
numbers = [1, 2, 3, 4, 5]
# 将数字转换为字符串后连接
numbers_joined = ", ".join(str(num) for num in numbers)
print("数字列表连接:", numbers_joined)

# 列表推导式
words = ["hello", "world", "python"]
# 将单词转换为大写后连接
upper_joined = " ".join(word.upper() for word in words)
print("大写单词连接:", upper_joined)


person = {"name": "jackie", "age": 10, "score": 100}

print("person=", person.values())

person_str = "@".join(str(item) for item in person.values())

print("person_str=", person_str)
